package com.fivestyle.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author 张代钊
 * @since 2021-08-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Book对象", description="")
public class Book implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "书名")
    private String bookName;

    @ApiModelProperty(value = "书籍数量")
    private Integer count;

    @ApiModelProperty(value = "书籍类型")
    private String bookType;

    @ApiModelProperty(value = "书籍价格")
    private BigDecimal price;

    @ApiModelProperty(value = "作者")
    private String author;

    @ApiModelProperty(value = "ISBN")
    @TableField("ISBN")
    private String isbn;

    @ApiModelProperty(value = "书籍图片")
    private String img;

    @ApiModelProperty(value = "出版社")
    private String publisher;

    @ApiModelProperty(value = "简介")
    private String introduction;

    @ApiModelProperty(value = "游览量")
    private Integer visit;

    @ApiModelProperty(value = "购买次数")
    private Integer buyCnt;

    @ApiModelProperty(value = "推荐")
    private boolean recommend;

    @TableField(fill = FieldFill.INSERT)
    private Date created;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updated;


}
